<%@ page language="java" pageEncoding="UTF-8"%><%

String path = request.getContextPath();
String basePath = new StringBuffer(request.getScheme()).append("://").append(request.getServerName()).
append(":").append(request.getServerPort()).append(path).toString();

//fixed for web app deploy to root server context ; at 2011-04-08 by zhadiw
//如果应用部署的站点根目录，则 path 值为空，导致部分URL跳转失效
if(null== path || "".equals(path)){
	path = basePath;
}

request.setAttribute("app.path",path);
request.setAttribute("app.base",basePath);

%><!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8" />
<meta http-equiv="MSThemeCompatible" content="Yes" />
<meta name="keywords" content="appframework" />
<meta name="description" content="appframework" />
<meta name="generator" content="appframework" />
<meta name="author" content="jiucai" />
<meta name="copyright" content="appframework" />
<meta name="version" content="${commonAppVersion}" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Demo App</title>
<link rel="shortcut icon" type="image/x-icon" href="${pageContext.request.contextPath}/favicon.ico"/>
<script type="text/javascript" src="${pageContext.request.contextPath}/cas/js/jquery-1.8.3.min.js"></script>
<script type="text/javascript">
<!--//--><![CDATA[<!--
var app = {};
app.path    = '<%=path%>';
app.base    = '<%=basePath%>';
app.success = '1';
app.failed  = '0';

function app_title(title){ document.title= title +  ' - ' +  document.title;  }
function app_alert(msg,callback){ alert(msg);}
function app_confirm(msg,callback){ return confirm(msg);}
function app_log(msg){
	try{
		var hasConsole = Boolean(window.console && window.console.firebug);
		if(hasConsole){
			console.debug(msg);
		}else{
			hasConsole = Boolean(window.console && window.console.debug);
			if(hasConsole){
				console.debug(msg);
			}
		}
	}catch(e){}
};
$(function() {
	//异步请求全局设置 20 秒
	$.ajaxSetup({
		timeout: 20000
	});
	
});

//--><!]]>
</script>


<!--[if IE 6]>
<script type="text/javascript" src="${pageContext.request.contextPath}/cas/js/DD_belatedPNG.js"></script>
<script type="text/javascript">DD_belatedPNG.fix('#logo-a,#logo-b');</script>
<![endif]-->
<!--[if IE 7]><meta http-equiv="X-UA-Compatible" content="EmulateIE7" />
<script type="text/javascript">
//alert('你用的是 ie 7');
</script>
<![endif]-->
<!--[if IE 8]><meta http-equiv="X-UA-Compatible" content="IE=8" />
<script type="text/javascript">
//alert('你用的是 ie 8');
</script>
<![endif]-->
<!--[if IE 9]><meta http-equiv="X-UA-Compatible" content="IE=8" />
<script type="text/javascript">
//alert('你用的是 ie 9');
</script>
<![endif]-->

